home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / Archives / Replacements / AKCC35.lha / Programmers / Examples / FPrintf.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-12-30  |  1.2 KB  |  44 lines

  1.  
  2.  /* FPrintf V37.3                                              */
  3.  /* FREEWARE.                                                  */
  4.  /* (c) 1993-94 by Andreas R. Kleinert.                        */
  5.  /* Demonstrates use of the FPrintf()-Function.                */
  6.  /* Written in SAS/C V6.51.                                    */
  7.  
  8. #include <akcc_gen0/akcc_gen0_pragma.h>
  9.  
  10. #include <stdlib.h>
  11.  
  12. #include <proto/exec.h>
  13.  
  14.  
  15. struct AKCCBase *AKCCBase = N;
  16.  
  17. void main(long argc, char **argv)
  18. {
  19.  AKCCBase = (struct AKCCBase *) OpenLibrary("akcc_gen0.library", 37);
  20.  if(AKCCBase)
  21.   {
  22.    char parsed_string[256];
  23.    ULONG fp_args[2];
  24.  
  25.    AKCC_FPrintf(Output(), "\nFPrintf V37.3, FREEWARE, (c) 1993-94 by Andreas R. Kleinert.\n", N);
  26.  
  27.    AKCC_ParseText("\nAll output is done via the \\B\\U%s\\N function"
  28.                   "\ninstead of printf() and is parsed through the"
  29.                   "\n\\B\\U%s\\N function for styling.\n", parsed_string);
  30.  
  31.    fp_args[0] = (ULONG) "AKCC_FPrintf()";
  32.    fp_args[1] = (ULONG) "AKCC_ParseText()";
  33.  
  34.    AKCC_FPrintf(Output(), parsed_string, &fp_args[0]);
  35.  
  36.    CloseLibrary((APTR) AKCCBase);
  37.   }else
  38.   {
  39.    puts("\n Can't open \42akcc_gen0.library\42 V37+ !\n");
  40.   }
  41.  
  42.  exit(0);
  43. }
  44.